﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using ServiceDeskUNAB.Controlador;

namespace ServiceDeskUNAB.Vista
{
    public partial class ListadoIncidenciasCreadasVista : UserControl
    {
        public ListadoIncidenciasCreadasVista()
        {
            InitializeComponent();
        } 

        private void ListadoResponsabilidadesVista_Load(object sender, EventArgs e)
        {
            using (Conexion.Instance.Con) //With this, you don't have to close the connection
            {

                SqlDataAdapter adapter = new SqlDataAdapter("select * from INCIDENCIA where CREADOR_INCIDENCIA='"+Conexion.Instance.SesionID+"'", Conexion.Instance.Con);
                DataSet ds = new DataSet();
                adapter.Fill(ds, "INCIDENCIA");
                dataGridViewIncidencias.DataSource = ds;
                dataGridViewIncidencias.DataMember = "INCIDENCIA";
            }
        }
    }
}
